<template>
	<div class="pinfo-box">
		<el-row>
			<el-col :span="4" style="text-align: right;">赠送积分：</el-col>
			<el-col :span="20"><el-input type="text" size="small" class="iptext" v-model="productAddData.giftPoint"/></el-col>
		</el-row>
		<el-row>
			<el-col :span="4" style="text-align: right;">赠送成长值：</el-col>
			<el-col :span="20"><el-input type="text" size="small" class="iptext" v-model="productAddData.giftGrowth"/></el-col>
		</el-row>
		<el-row>
			<el-col :span="4" style="text-align: right;">积分购买限制：</el-col>
			<el-col :span="20"><el-input type="text" size="small" class="iptext" v-model="productAddData.usePointLimit"/></el-col>
		</el-row>
		<el-row>
			<el-col :span="4" style="text-align: right;">预告商品：</el-col>
			<el-col :span="20">
				<el-switch size="small" :active-value="1" :inactive-value="0" active-color="#13ce66" inactive-color="#ff4949" v-model="productAddData.previewStatus"/>
			</el-col>
		</el-row>
		<el-row>
			<el-col :span="4" style="text-align: right;">商品上架：</el-col>
			<el-col :span="20">
				<el-switch size="small" :active-value="1" :inactive-value="0" active-color="#13ce66" inactive-color="#ff4949" v-model="productAddData.publishStatus"/>
			</el-col>
		</el-row>
		<el-row>
			<el-col :span="4" style="text-align: right;">商品推荐：</el-col>
			<el-col :span="20">
				新品:
				<el-switch size="small" :active-value="1" :inactive-value="0" active-color="#13ce66" inactive-color="#ff4949" v-model="productAddData.newStatus"/>
				推荐:
				<el-switch size="small" :active-value="1" :inactive-value="0" active-color="#13ce66" inactive-color="#ff4949" v-model="productAddData.recommandStatus"/>
			</el-col>	
		</el-row>
		<el-row>
			<el-col :span="4" style="text-align: right;">服务保证：</el-col>
			<el-col :span="20">
				<el-checkbox-group v-model="myserviceIds">
				    <el-checkbox :label="1">无忧退货</el-checkbox>
				    <el-checkbox :label="2">快速退款</el-checkbox>
				    <el-checkbox :label="3">免费包邮</el-checkbox>
				  </el-checkbox-group>
			</el-col>
		</el-row>
		<!-- <el-row>
			<el-col :span="4" style="text-align: right;">详细页标题：</el-col>
			<el-col :span="20"><el-input type="text" size="small" class="iptext" v-model="productAddData.unit"/></el-col>
		</el-row>
		<el-row>
			<el-col :span="4" style="text-align: right;">详细页描述：</el-col>
			<el-col :span="20"><el-input type="text" size="small" class="iptext" v-model="productAddData.unit"/></el-col>
		</el-row>
		<el-row>
			<el-col :span="4" style="text-align: right;">商品关键字：</el-col>
			<el-col :span="20"><el-input type="text" size="small" class="iptext" v-model="productAddData.unit"/></el-col>
		</el-row>
		<el-row>
			<el-col :span="4" style="text-align: right;">商品备注：</el-col>
			<el-col :span="20"><el-input type="text" size="small" class="iptext" v-model="productAddData.unit"/></el-col>
		</el-row> -->
		<el-row>
			<el-col :span="4" style="text-align: right;">选择优惠方式：</el-col>
			<el-col :span="20">
				<!-- <el-input type="text" size="small" class="iptext" v-model="productAddData.unit"/> -->
			</el-col>
		</el-row>
		<el-button type="success" @click="next">下一步，填写商品属性</el-button>
	</div>
</template>

<script>
	import Vuex from 'vuex'
	let mapState = Vuex.mapState;
	export default{
		data(){
			return{
				myserviceIds:[1,2,3]
			}
		},
		methods:{
			next(){
				//还要将步骤条推一步
				this.$store.commit('activeProductAddStep',2);
				
				//调整serviceId的值
				this.productAddData.serviceIds=this.myserviceIds.join(",");
				//下一个div
				this.$router.push("/product/product/add/attr")
			}
		},
		computed:{
			...mapState(["activeProductAddStep","productAddData"]),
		}
	}
</script>

<style lang="scss" scoped="scoped">
	.pinfo-box{
		margin-top:50px;
		.el_input {
			height:32px;
			.el_input__inner{
				height:32px !important;
			}
		}
		.el-row{
			margin:20px;
			line-height: 32px;
		}
		
		
	}
</style>

